convert binary number to decimal and vice versa